Optimal. Leaf size=49 \[ -\frac {3 \tanh ^{-1}(\cos (a+b x))}{16 b}+\frac {3 \sec (a+b x)}{16 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{16 b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {4372, 2702,
294, 327, 213} \begin {gather*} \frac {3 \sec (a+b x)}{16 b}-\frac {3 \tanh ^{-1}(\cos (a+b x))}{16 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{16 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 294
Rule 327
Rule 2702
Rule 4372
Rubi steps
\begin {align*} \int \cos (a+b x) \csc ^3(2 a+2 b x) \, dx &=\frac {1}{8} \int \csc ^3(a+b x) \sec ^2(a+b x) \, dx\\ &=\frac {\text {Subst}\left (\int \frac {x^4}{\left (-1+x^2\right )^2} \, dx,x,\sec (a+b x)\right )}{8 b}\\ &=-\frac {\csc ^2(a+b x) \sec (a+b x)}{16 b}+\frac {3 \text {Subst}\left (\int \frac {x^2}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{16 b}\\ &=\frac {3 \sec (a+b x)}{16 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{16 b}+\frac {3 \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\sec (a+b x)\right )}{16 b}\\ &=-\frac {3 \tanh ^{-1}(\cos (a+b x))}{16 b}+\frac {3 \sec (a+b x)}{16 b}-\frac {\csc ^2(a+b x) \sec (a+b x)}{16 b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(143\) vs. \(2(49)=98\).
time = 0.28, size = 143, normalized size = 2.92 \begin {gather*} \frac {\csc ^4(a+b x) \left (2-6 \cos (2 (a+b x))+2 \cos (3 (a+b x))+3 \cos (3 (a+b x)) \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )-3 \cos (3 (a+b x)) \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )+\cos (a+b x) \left (-2-3 \log \left (\cos \left (\frac {1}{2} (a+b x)\right )\right )+3 \log \left (\sin \left (\frac {1}{2} (a+b x)\right )\right )\right )\right )}{16 b \left (\csc ^2\left (\frac {1}{2} (a+b x)\right )-\sec ^2\left (\frac {1}{2} (a+b x)\right )\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.18, size = 53, normalized size = 1.08
method | result | size |
default | \(\frac {-\frac {1}{2 \sin \left (x b +a \right )^{2} \cos \left (x b +a \right )}+\frac {3}{2 \cos \left (x b +a \right )}+\frac {3 \ln \left (\csc \left (x b +a \right )-\cot \left (x b +a \right )\right )}{2}}{8 b}\) | \(53\) |
risch | \(\frac {3 \,{\mathrm e}^{5 i \left (x b +a \right )}-2 \,{\mathrm e}^{3 i \left (x b +a \right )}+3 \,{\mathrm e}^{i \left (x b +a \right )}}{8 b \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right )^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}+\frac {3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{16 b}-\frac {3 \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{16 b}\) | \(101\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 974 vs.
\(2 (43) = 86\).
time = 0.29, size = 974, normalized size = 19.88 \begin {gather*} \frac {4 \, {\left (3 \, \cos \left (5 \, b x + 5 \, a\right ) - 2 \, \cos \left (3 \, b x + 3 \, a\right ) + 3 \, \cos \left (b x + a\right )\right )} \cos \left (6 \, b x + 6 \, a\right ) - 12 \, {\left (\cos \left (4 \, b x + 4 \, a\right ) + \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (5 \, b x + 5 \, a\right ) + 4 \, {\left (2 \, \cos \left (3 \, b x + 3 \, a\right ) - 3 \, \cos \left (b x + a\right )\right )} \cos \left (4 \, b x + 4 \, a\right ) + 8 \, {\left (\cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (3 \, b x + 3 \, a\right ) - 12 \, \cos \left (2 \, b x + 2 \, a\right ) \cos \left (b x + a\right ) + 3 \, {\left (2 \, {\left (\cos \left (4 \, b x + 4 \, a\right ) + \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (6 \, b x + 6 \, a\right ) - \cos \left (6 \, b x + 6 \, a\right )^{2} - 2 \, {\left (\cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (4 \, b x + 4 \, a\right ) - \cos \left (4 \, b x + 4 \, a\right )^{2} - \cos \left (2 \, b x + 2 \, a\right )^{2} + 2 \, {\left (\sin \left (4 \, b x + 4 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right )} \sin \left (6 \, b x + 6 \, a\right ) - \sin \left (6 \, b x + 6 \, a\right )^{2} - \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \log \left (\cos \left (b x\right )^{2} + 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} - 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) - 3 \, {\left (2 \, {\left (\cos \left (4 \, b x + 4 \, a\right ) + \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (6 \, b x + 6 \, a\right ) - \cos \left (6 \, b x + 6 \, a\right )^{2} - 2 \, {\left (\cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \cos \left (4 \, b x + 4 \, a\right ) - \cos \left (4 \, b x + 4 \, a\right )^{2} - \cos \left (2 \, b x + 2 \, a\right )^{2} + 2 \, {\left (\sin \left (4 \, b x + 4 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right )} \sin \left (6 \, b x + 6 \, a\right ) - \sin \left (6 \, b x + 6 \, a\right )^{2} - \sin \left (4 \, b x + 4 \, a\right )^{2} - 2 \, \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) - \sin \left (2 \, b x + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b x + 2 \, a\right ) - 1\right )} \log \left (\cos \left (b x\right )^{2} - 2 \, \cos \left (b x\right ) \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (b x\right )^{2} + 2 \, \sin \left (b x\right ) \sin \left (a\right ) + \sin \left (a\right )^{2}\right ) + 4 \, {\left (3 \, \sin \left (5 \, b x + 5 \, a\right ) - 2 \, \sin \left (3 \, b x + 3 \, a\right ) + 3 \, \sin \left (b x + a\right )\right )} \sin \left (6 \, b x + 6 \, a\right ) - 12 \, {\left (\sin \left (4 \, b x + 4 \, a\right ) + \sin \left (2 \, b x + 2 \, a\right )\right )} \sin \left (5 \, b x + 5 \, a\right ) + 4 \, {\left (2 \, \sin \left (3 \, b x + 3 \, a\right ) - 3 \, \sin \left (b x + a\right )\right )} \sin \left (4 \, b x + 4 \, a\right ) + 8 \, \sin \left (3 \, b x + 3 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) - 12 \, \sin \left (2 \, b x + 2 \, a\right ) \sin \left (b x + a\right ) + 12 \, \cos \left (b x + a\right )}{32 \, {\left (b \cos \left (6 \, b x + 6 \, a\right )^{2} + b \cos \left (4 \, b x + 4 \, a\right )^{2} + b \cos \left (2 \, b x + 2 \, a\right )^{2} + b \sin \left (6 \, b x + 6 \, a\right )^{2} + b \sin \left (4 \, b x + 4 \, a\right )^{2} + 2 \, b \sin \left (4 \, b x + 4 \, a\right ) \sin \left (2 \, b x + 2 \, a\right ) + b \sin \left (2 \, b x + 2 \, a\right )^{2} - 2 \, {\left (b \cos \left (4 \, b x + 4 \, a\right ) + b \cos \left (2 \, b x + 2 \, a\right ) - b\right )} \cos \left (6 \, b x + 6 \, a\right ) + 2 \, {\left (b \cos \left (2 \, b x + 2 \, a\right ) - b\right )} \cos \left (4 \, b x + 4 \, a\right ) - 2 \, b \cos \left (2 \, b x + 2 \, a\right ) - 2 \, {\left (b \sin \left (4 \, b x + 4 \, a\right ) + b \sin \left (2 \, b x + 2 \, a\right )\right )} \sin \left (6 \, b x + 6 \, a\right ) + b\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 96 vs.
\(2 (43) = 86\).
time = 2.53, size = 96, normalized size = 1.96 \begin {gather*} \frac {6 \, \cos \left (b x + a\right )^{2} - 3 \, {\left (\cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )\right )} \log \left (\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) + 3 \, {\left (\cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )\right )} \log \left (-\frac {1}{2} \, \cos \left (b x + a\right ) + \frac {1}{2}\right ) - 4}{32 \, {\left (b \cos \left (b x + a\right )^{3} - b \cos \left (b x + a\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.53, size = 63, normalized size = 1.29 \begin {gather*} \frac {\frac {2 \, {\left (3 \, \cos \left (b x + a\right )^{2} - 2\right )}}{\cos \left (b x + a\right )^{3} - \cos \left (b x + a\right )} - 3 \, \log \left (\cos \left (b x + a\right ) + 1\right ) + 3 \, \log \left (-\cos \left (b x + a\right ) + 1\right )}{32 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.08, size = 49, normalized size = 1.00 \begin {gather*} -\frac {3\,\mathrm {atanh}\left (\cos \left (a+b\,x\right )\right )}{16\,b}-\frac {\frac {3\,{\cos \left (a+b\,x\right )}^2}{16}-\frac {1}{8}}{b\,\left (\cos \left (a+b\,x\right )-{\cos \left (a+b\,x\right )}^3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________